﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<%@ Import Namespace="calculation.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	 <%= ViewData["Name"]%>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2> </h2>
     <%= Html.ActionLink("Добавить новый материал","Add") %>
    <table>
        <tr>
            <td>
                
            </td>
            <td>
                Название:
            </td>
            <td>
                Тип материала:
            </td>
        </tr>
        <%
            foreach (Material m in (IEnumerable<Material>)ViewData["Materials"])
            {%>
        <tr>
            <td>
                <%= Html.ActionLink("Посмотреть", "Material", new {id = m.MaterialId })%>
            </td>
            <td>
                <%=m.Name %>
            </td>
            <td>
                <%=m.TypeMaterial %>
            </td>
        </tr>
        <% }%>
    </table>
</asp:Content>
